Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 8 - Light Objects / Light Objects Reference
Data Structures


Light Data Structure

You use a light data structure to get or set basic information about a light source of any kind. A light data structure is defined by the TQ3LightData data type.

typedef struct TQ3LightData {
   TQ3Boolean                 isOn;
   float                      brightness;
   TQ3ColorRGB                color;
} TQ3LightData;
Field Description
isOn
A Boolean value that indicates whether the light source is active (kQ3True) or inactive (kQ3False).
brightness
The brightness or intensity of the light source. The value in this field is a floating-point number in the range 0.0 to 1.0, inclusive. Some renderers may allow you to specify overbright lights (where the value in this field is greater than 1.0) or lights with negative brightness (where the value in this field is less than 0.0); the effects produced by out-of-range brightness values are renderer-specific.
color
The color of the light emitted by a light source.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996